<template>
  <div>
    <Login v-if="$store.state.isLogin == false"></Login>
    <PageHome v-else></PageHome>
  </div>
</template>

<script>
import PageHome from './pages/PageHome.vue'
import Login from './pages/Login.vue'

export default {
  name: 'App',
  components:{
    PageHome,
    Login
  },
  data(){
    return{
    }
  },
  mounted(){
    if( localStorage.getItem('user') == null){
      this.$store.commit('logout')
    }else{
      this.$store.commit('login')
    }
  }
  
}
</script>

<style>
  /* div{
    width: 100vw;
    height: 100vh;
    overflow: hidden;
  } */
</style>
